<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="measureUnitDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='measureUnitDetail.heading'/>"/>
            <meta name="menu" content="RoleMaterial"/>
</head>

<div id="help">
    <h2>
        <a href="<c:url value='helpMeasureUnitForm.html?decorate=false'/>"
           title="Help measure unit form"
           onclick="Modalbox.show(this.href, {title: this.title, width: 600}); return false;">
               <fmt:message key="help"/>
        </a>
    </h2>
</div>

<s:form id="measureUnitForm" action="saveMeasureUnit" method="post" validate="true">
    <s:hidden name="measureUnit.id" value="%{measureUnit.id}"/>
    <s:textfield maxLength="40" key="measureUnit.name" required="true" cssClass="text medium"/>
    <s:textfield maxLength="40" key="measureUnit.description" required="true" cssClass="text medium"/>
    <li class="buttonBar bottom">
        <s:submit cssClass="button" method="save" key="button.save" theme="simple"/>
        <c:if test="${not empty measureUnit.id}">
            <s:submit cssClass="button" method="delete" key="button.delete" onclick="return confirmDelete('measure unit')" theme="simple"/>
        </c:if>
        <s:submit cssClass="button" method="cancel" key="button.cancel" theme="simple"/>
    </li>

</s:form>

<script type="text/javascript">
    Form.focusFirstElement($("measureUnitForm"));
</script>